home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Utilities / Disk / BTSneak / Install_BenchTrash < prev    next >
Text File  |  1998-06-24  |  12KB  |  372 lines

  1. ; $VER: Install_BenchTrash 40.2 (16th November 1997)
  2. ; Script to install BenchTrash version 1.24 and up
  3. ; © 1997 THOR - Software
  4. ;
  5. ; The installer software is copyrighted © 1993 CBM
  6. ;
  7.  
  8. ; tell the user that we're 0% done
  9. (complete 0)
  10.  
  11. ;=============================================================================
  12. ; useful procedure
  13.  
  14. (procedure TERMINATE (makeassign "..BenchTrash..")
  15.  
  16. )
  17.  
  18. ;==========================================================================
  19. ; termination stuff
  20.  
  21. (onerror (TERMINATE))
  22.  
  23. ;==========================================================================
  24. ; get current WB version
  25. (set #version (/ (getversion "LIBS:version.library") 65536))
  26.  
  27. ;get language specific strings
  28. ;==========================================================================
  29. ; English strings
  30.  
  31. (set default_lang 4)
  32.  
  33. (set #yes "Yes")
  34. (set #no  "No")
  35.  
  36. (set #which-disk
  37. (cat "Where should I install BenchTrash?"
  38. ))
  39.  
  40. (set #which-disk-help
  41. (cat "This section lets you choose where the "
  42.      "the BenchTrash program should go. It defaults to "
  43.      "the SYS:WBStartup drawer so this program gets "
  44.      "launched during booting.\n"
  45.      "No drawer will be created.\n\n"
  46.      @askdir-help
  47. ))
  48.  
  49. (set #move-old-1
  50. (cat "Copy"
  51. ))
  52.  
  53. (set #move-old-2
  54. (cat "Skip"
  55. ))
  56.  
  57.  
  58. (set #bt-newicons
  59. (cat "Shall I install the NewIcons version of BenchTrash?"
  60. ))
  61.  
  62. (set #bt-newicons-help
  63. (cat "You may choose here to install a better looking NewIcons "
  64.      "version of the BenchTrash icon. This requires, however, the "
  65.      "newicons.library, but looks better for screens with more "
  66.      "colors. Thanks to Claudio Pucci for drawing this icon."
  67. ))
  68.  
  69. (set #trash-newicons
  70. (cat "Shall I install the NewIcons version of the Trashcan icon?"
  71. ))
  72.  
  73. (set #trash-newicons-help
  74. (cat "You may choose here to install a better looking NewIcons "
  75.      "version of the Trashcan icon, to replace the usual icon "
  76.      "stored in Trashcan.info that comes with the workbench.\n"
  77.      "This requires, however, the "
  78.      "newicons.library, but looks better for screens with more "
  79.      "colors. Thanks to Claudio Pucci for drawing this icon."
  80. ))
  81.  
  82. (set #do-locale
  83. (cat    "Which languages do you want to install?"
  84. ))
  85.  
  86. (set #locale-help
  87. (cat    "BenchTrash can be localized to various languages. "
  88.         "Please select the languages you want to install."
  89.         "English is built in, btw."
  90. ))
  91.  
  92. (set #copy-help
  93. (cat    "O.K. to install the BenchTrash Guide?"
  94. ))
  95.  
  96. (set #copy-help-help
  97. (cat    "The BenchTrash guide is a documentation of "
  98.         "the BenchTrash program.\n"
  99.         "If you aren't "
  100.         "really low on disk space, you should install it."
  101. ))
  102.  
  103. (set #help-dir
  104. (cat    "Please select the drawer to install the help-guide:"
  105. ))
  106.  
  107. (set #help-help
  108. (cat    "BenchTrash comes with an online help guide, using Commodore's "
  109.         "AmigaGuide or MultiView program. Please select the drawer to copy "
  110.         "this database to."
  111. ))
  112.  
  113.  
  114. (set #browser-where
  115. (cat    "Please locate your favorite AmigaGuide browser:"
  116. ))
  117.  
  118. (set #browser-help
  119. (cat    "Please select a program that can display AmigaGuide files. "
  120.         "This should be AmigaGuide or Multiview. As a last resort, "
  121.         "select MORE or Ed, that can be found in the Utilities or "
  122.         "C: drawer of your workbench disk."
  123. ))
  124.  
  125. (set #copy-extras
  126. (cat    "Shall I install the BenchTrash extras?"
  127. ))
  128.  
  129. (set #copy-extras-help
  130. (cat    "The Extras programs can be used to unmount a volume "
  131.         "by dragging its icon onto the benchtrash. They consist "
  132.         "of one script and one tiny program.\n"
  133.         "The script will be copied to the S: drawer and "
  134.         "the command will go into C:.\n"
  135.         "Please consult the ReadMe file in the Extras drawer "
  136.         "in this archive on how to use them."
  137. ))
  138.  
  139.  
  140. (set #exit-not-found
  141. (cat    "Unable to find your file \"%s\" - DOS error %ld "
  142.         "- installation aborted. "
  143. ))
  144.  
  145. (set #exit-text
  146. (cat    "Installation of BenchTrash done. Hope you enjoy it..."
  147. ))
  148.  
  149. ;==========================================================================
  150. ;say hi !
  151. (welcome)
  152.  
  153. ;==========================================================================
  154. ; now copy BenchTrash to target
  155.  
  156. (set #target    (askdir (prompt #which-disk)
  157.                         (help   #which-disk-help)
  158.                         (default "SYS:WBStartup")
  159.                 )
  160. )
  161.  
  162. (set @default-dest #target)
  163.  
  164. (copyfiles
  165.         (source "BenchTrash")
  166.         (infos)
  167.         (noposition)
  168.         (dest #target)
  169. )
  170.  
  171. ;===========================================================================
  172. ;Install newicons ?
  173. (complete 20)
  174.  
  175. (set #pi-bt-newicons
  176.         (askbool        (prompt #bt-newicons)
  177.                         (help #bt-newicons-help)
  178.                         (default 0)
  179.                         (choices #yes #no)
  180.         )
  181. )
  182.  
  183. (if #pi-bt-newicons
  184.         (copyfiles
  185.                 (source "NewIcons/BenchTrash.info")
  186.                 (dest #target)
  187.         )
  188. )
  189.  
  190.  
  191. (set #pi-trash-newicons
  192.         (askbool        (prompt #trash-newicons)
  193.                         (help #trash-newicons-help)
  194.                         (default 0)
  195.                         (choices #yes #no)
  196.         )
  197. )
  198.  
  199. (if #pi-trash-newicons
  200.         (copyfiles
  201.                 (source "NewIcons/Trashcan.info")
  202.                 (dest "SYS:Trashcan.info")
  203.         )
  204. )
  205.  
  206. ;==========================================================================
  207. (complete 20)
  208. ;add language-specific if 2.1 or higher
  209. (if (>= #version 38)
  210.         ;then
  211.         (
  212.                 (set #language (askoptions      (prompt #do-locale)
  213.                                                 (help #locale-help)
  214.                                                 (default -1)
  215.                                                 (choices "English"
  216.                                                          "Deutsch"
  217.                                                          "Italiano"
  218.                                                          "Français"
  219.                                                          "Greek"
  220.                                                          "Svenska"
  221.                                                          "suomi"
  222.                                                          "Español"
  223.                                                 )
  224.                                 )
  225.                 )
  226.  
  227.                 (if (IN #language 1)
  228.                         (if (exists "LOCALE:Catalogs/Deutsch")
  229.                                 (copyfiles
  230.                                         (source "Deutsch/BenchTrash.catalog")
  231.                                         (dest   "LOCALE:Catalogs/Deutsch/")
  232.                                 )
  233.                         )
  234.                 )
  235.  
  236.                 (if (IN #language 2)
  237.                         (if (exists "LOCALE:Catalogs/Italiano")
  238.                                 (copyfiles
  239.                                         (source "Italiano/BenchTrash.catalog")
  240.                                         (dest   "LOCALE:Catalogs/Italiano/")
  241.                                 )
  242.                         )
  243.                 )
  244.  
  245.                 (if (IN #language 3)
  246.                         (if (exists "LOCALE:Catalogs/Français")
  247.                                 (copyfiles
  248.                                         (source "Français/BenchTrash.catalog")
  249.                                         (dest   "LOCALE:Catalogs/Français/")
  250.                                 )
  251.                         )
  252.                 )
  253.  
  254.                 (if (IN #language 4)
  255.                         (if (exists "LOCALE:Catalogs/Greek")
  256.                                 (copyfiles
  257.                                         (source "Greek/BenchTrash.catalog")
  258.                                         (dest   "LOCALE:Catalogs/Greek/")
  259.                                 )
  260.                         )
  261.                 )
  262.  
  263.                 (if (IN #language 5)
  264.                         (if (exists "LOCALE:Catalogs/Svenska")
  265.                                 (copyfiles
  266.                                         (source "Svenska/BenchTrash.catalog")
  267.                                         (dest   "LOCALE:Catalogs/Svenska/")
  268.                                 )
  269.                         )
  270.                 )
  271.  
  272.                 (if (IN #language 6)
  273.                         (if (exists "LOCALE:Catalogs/Suomi")
  274.                                 (copyfiles
  275.                                         (source "Suomi/BenchTrash.catalog")
  276.                                         (dest   "LOCALE:Catalogs/Suomi/")
  277.                                 )
  278.                         )
  279.                 )
  280.  
  281.                 (if (IN #language 7)
  282.                         (if (exists "LOCALE:Catalogs/Español")
  283.                                 (copyfiles
  284.                                         (source "Español/BenchTrash.catalog")
  285.                                         (dest   "LOCALE:Catalogs/Español/")
  286.                                 )
  287.                         )
  288.                 )
  289.  
  290.         )
  291. )
  292.  
  293. (complete 40)
  294. ;===========================================================================
  295. ;ask user to install the BenchTrash-guide
  296. (if (> @user-level 1)
  297.         (set #do-help   (askbool        (prompt #copy-help)
  298.                                         (help #copy-help-help)
  299.                                         (default 1)
  300.                                         (choices #yes #no)
  301.                         )
  302.         )
  303.         (set #do-help 1)
  304. )
  305.  
  306. (if #do-help
  307.         (
  308.                 (set #where-guide       (askdir         (prompt #help-dir)
  309.                                                         (help   #help-help)
  310.                                                         (default "SYS:")
  311.                                         )
  312.                 )
  313.  
  314.                 (if #where-guide
  315.                         (
  316.                                 (copyfiles
  317.                                         (source "BenchTrash.Guide")
  318.                                         (dest #where-guide)
  319.                                 )
  320.                                 (copyfiles
  321.                                         (source "BenchTrash.Guide.info")
  322.                                         (dest #where-guide)
  323.                                 )
  324.  
  325.                                 (set #guide-path (askfile       (prompt #browser-where)
  326.                                                                 (help #browser-help)
  327.                                                                 (default "SYS:Utilities/MultiView")
  328.                                                 )
  329.                                 )
  330.  
  331.                                 (if #guide-path
  332.                                         (tooltype
  333.                                                 (dest (tackon #where-guide "BenchTrash.Guide"))
  334.                                                 (setdefaulttool #guide-path)
  335.                                         )
  336.                                 )
  337.  
  338.                         )
  339.                 )
  340.         )
  341. )
  342. ;==========================================================================
  343. (complete 80)
  344. (if (> @user-level 1)
  345.         (set #do-extras (askbool        (prompt #copy-extras)
  346.                                         (help #copy-extras-help)
  347.                                         (default 0)
  348.                                         (choices #yes #no)
  349.                         )
  350.         )
  351.         (set #do-extras 0)
  352. )
  353.  
  354. (if #do-extras
  355.         (
  356.                 (copyfiles      (source "Extras/ResolveDeviceName")
  357.                                 (dest   "C:")
  358.                 )
  359.  
  360.                 (copyfiles      (source "Extras/RemoveDevice")
  361.                                 (dest   "S:")
  362.                 )
  363.         )
  364. )
  365.  
  366. ;==========================================================================
  367. (complete 100)
  368.  
  369. (TERMINATE)
  370.  
  371. (exit #exit-text)
  372.